home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / ctrlkits / cntrlreg.pas < prev    next >
Pascal/Delphi Source File  |  1995-12-22  |  1KB  |  49 lines

  1. unit CntrlReg;
  2.  
  3. interface
  4.  
  5. uses
  6.   Classes, IniFiles, Dialogs,
  7.   AboutPrp, Ctrl3D, ColorBtn, GraphBtn, LBoxChk, LabelFrm, ListHdr, TabBox;
  8.  
  9. const
  10.   DEF_TABNAME     = 'New Controls';
  11.   INI_SECTION     = 'RWH.DelphiTools';
  12.   INI_TABNAME_ID  = 'ControlsTab';
  13.  
  14. procedure Register;
  15.  
  16. implementation
  17.  
  18. procedure Register;
  19. var
  20.   TabName : String;
  21.  
  22. begin
  23.   TabName := '';
  24.  
  25.   with TIniFile.Create('DELPHI.INI') do begin
  26.     try
  27.       TabName := ReadString(INI_SECTION, INI_TABNAME_ID, '');
  28.  
  29.       if (TabName = '') then
  30.         TabName := InputBox('Install Controls To', 'Component tab name', DEF_TABNAME);
  31.  
  32.       if (TabName = '') then
  33.         TabName := DEF_TABNAME;
  34.  
  35.       WriteString(INI_SECTION, INI_TABNAME_ID, TabName);
  36.  
  37.     finally
  38.       Free;
  39.     end;
  40.   end;
  41.  
  42.   AboutPrp.Register;
  43.   RegisterComponents(TabName, [TLabel3D, TFramedLabel,
  44.                                TTabListHeader, TTabListBox, TTabComboBox, TCheckListBox,
  45.                                TGraphicButton, TColoredButton, TButton3D]);
  46. end;
  47.  
  48. end.
  49.